package com.topfinance.cnaps2.web.sys;

import java.util.HashMap;
import java.util.List;

import com.topfinance.cnaps2.ebo.TblHiberEbo;
import com.topfinance.cnaps2.service.ITblHiberManager;
import com.topfinance.frame.web.BaseSupport;
import com.opensymphony.xwork2.ModelDriven;

/**
 * <p>
 * Description:
 * </p>
 * 
 * @author
 * @version 1.50
 *          <p>
 *          Copyright: Copyright (c) 2004 2005
 *          </p>
 *          <p>
 *          Company:
 *          </p>
 */
public final class TblHiberAction extends BaseSupport implements ModelDriven<TblHiberEbo> {

	private ITblHiberManager tblHiberManager = null;

	private TblHiberEbo transEbo = new TblHiberEbo();

	public TblHiberEbo getModel() {
		return transEbo;
	}

	public void setTblHiberManager(ITblHiberManager tblHiberManager) {
		this.tblHiberManager = tblHiberManager;
	}

	public TblHiberAction() {
		super();
	}

	public String execute() {
		return list();
	}

	public String list() {
		System.out.println("Herer to ...");
		log.debug("TblHiberAction-list begin");
		try {
			log.debug("getAllTransList begin");
			List l = tblHiberManager.getAllTblHiberList();
			log.debug("getAllTransList end");
			rtnResultMap = new HashMap();
			rtnResultMap.put(DATA_LIST_ROOT, l);
			rtnResultMap.put(RECORDS_COUNT, l.size());
		} catch (Exception e) {
			handleException(e);
		}
		log.debug("TblHiberAction-list end");
		return SUCCESS;
	}

}
